import java.math.BigDecimal;


public class Article implements Comparable<Article> {
	String 	word;			//word 
	String 	tfidf;
	int numOfWord;		//number of documents which contains the word in set of documents
	int numOfWordADoc;	//number of this word in a document
	int docLength;		//length of document
	double 	ifidf;		//if-idf of document
	
	public Article() {
		this.word 			= "";
		this.tfidf 			= "";
		this.numOfWord 		= 0;
		this.numOfWordADoc 	= 0;
		this.docLength		= 0;
		this.ifidf			= 0;
	}
	
	public Article(String word, String 	tfidf, int numOfWord, int numOfWordADoc, int docLength, double ifidf) {
		this.word 			= word;
		this.tfidf 			= tfidf;
		this.numOfWord 		= numOfWord;
		this.numOfWordADoc 	= numOfWordADoc;
		this.docLength		= docLength;
		this.ifidf			= ifidf;
	}

	public String getTfidf() {
		return tfidf;
	}

	public void setTfidf(String tfidf) {
		this.tfidf = tfidf;
	}

	public String getWord() {
		return word;
	}

	public void setWord(String word) {
		this.word = word;
	}

	public int getNumOfWord() {
		return numOfWord;
	}

	public void setNumOfWord(int numOfWord) {
		this.numOfWord = numOfWord;
	}

	public int getNumOfWordADoc() {
		return numOfWordADoc;
	}

	public void setNumOfWordADoc(int numOfWordADoc) {
		this.numOfWordADoc = numOfWordADoc;
	}

	public int getDocLength() {
		return docLength;
	}

	public void setDocLength(int docLength) {
		this.docLength = docLength;
	}

	public double getIfidf() {
		return ifidf;
	}

	public void setIfidf(double ifidf) {
		this.ifidf = ifidf;
	}

	@Override
	public int compareTo(Article article) {
		if(this.word.compareTo(article.getWord()) > 0){
			return 1;
		}
		if(this.word.compareTo(article.getWord()) == 0){
			return 0;
		}
		return -1;
	}
	
}
